/**
 * Project Name:renshuaipeng-auth
 * File Name:AuthGroup.java
 * Package Name:ren.renshuaipeng.auth.service.auth
 * Date:2015年12月20日 下午8:18:27
 * Copyright (c) 2015, niao.shuai123@163.com All Rights Reserved.
 */

package ren.renshuaipeng.auth.service.auth;

import javax.annotation.Resource;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import ren.renshuaipeng.auth.dao.auth.AuthGroupDao;
import ren.renshuaipeng.auth.domain.auth.AuthGroup;

/**
 * ClassName: AuthGroup.java<br/>
 * Function: . <br/>
 * Date: 2015年12月20日 下午8:18:27<br/>
 *
 * @author 任帅鹏（作者）
 * @version V1.00 （版本号）
 * @see
 * @since JDK 1.8
 */
@Service
@Transactional(readOnly = false)
public class AuthGroupService {

	@Resource
	AuthGroupDao authGroupDao;

	@Transactional
	public AuthGroup save(AuthGroup authGroup) {
		return authGroupDao.save(authGroup);
	}

	@Transactional
	public void delete(String id) {
		authGroupDao.delete(id);
	}

	public Page<AuthGroup> findPage(Pageable pageable) {
		return authGroupDao.findAll(pageable);
	}
	
	public AuthGroup findById(String id){
		return authGroupDao.findOne(id);
	}
}
